package com.ic.loan.pop

import android.content.Context
import com.blankj.utilcode.util.ActivityUtils
import com.ic.loan.R
import com.ic.loan.activity.MainActivity
import com.lxj.xpopup.core.CenterPopupView
import com.lxj.xpopup.util.XPopupUtils
import kotlinx.android.synthetic.main.pop_red_envelope.view.*

class RedEnvelopePop(var mContext: Context,val clickOk:()->Unit): CenterPopupView(mContext) {
    override fun getImplLayoutId(): Int {
        return R.layout.pop_red_envelope
    }

    override fun getMaxWidth(): Int {
        return XPopupUtils.getAppWidth(mContext)
    }

    override fun onCreate() {
        super.onCreate()
        ivClose.setOnClickListener {
            dismiss()
        }
        ivOk.setOnClickListener {
            dismiss()
            clickOk.invoke()
        }
    }
}